<div class="row">
    <div class="span12 marginbottom20">
        <form method="post" action="<?php echo $this->url_edit . @$info->INF_ID; ?>"  enctype="multipart/form-data">
            <div class="table_head"><h6><i class="icon-list-alt"></i>
			<?php
			if(@$info->INF_ID > 0)
			{
				echo 'Thông tin '.@$tresource->RES_NAME;
				
			}
			else {
				echo 'Thêm mới '.@$tresource->RES_NAME;
			}
			?></h6></div>
            <div class="subcont">
                <ul class="details span10">
				
                   <li>
					<?php echo $this->atheme->group_single_upload('userfile', 'Ảnh đại diện', '', ' span6', @$info->INF_THUMB, 'text', '180px','80px'); ?>
					</li>
					 <li>
					<?php echo $this->atheme->group_input2('info[INF_TITLE]', 'Tên bài viết*', 'txtCodeTitle', 'required span6', @$info->INF_TITLE, 'text', ''); ?>
					
					</li>
					
					<li>
                       <?php echo $this->atheme->group_select2('info[INFCATE_ID]', 'Danh mục', '', 'required ',$infocate, @$info->INFCATE_ID, 'style="width:200"'); ?>
                    </li>
					<li>
                       <?php echo $this->atheme->group_select2('info[INF_STATUS]', 'Trạng thái', 'status', 'required ',array("1"=>"Hiện","0"=>"Ẩn","2"=>"Gói cước"), @$info->INF_STATUS, ''); ?>
                    </li>
					<li>Nội dung</li>
					<textarea  rows="4" cols="10" class="required span12 ckeditor" name="info[INF_CONTENT]" id="editor1"><?php echo @$info->INF_CONTENT;?></textarea>
					
					<li>Hình ảnh</li><br>
					<?php $this->load->view($this->template->tpl_prefix_admin . 'info/images');?>
					
					<li>Nội dung tóm tắt(nếu có)</li>
					<textarea  rows="4" cols="10" class="required span12 ckeditor" name="info[INF_SHORT_CONTENT]" id="editor2"><?php echo @$info->INF_SHORT_CONTENT;?></textarea>
					 <li>
					<?php echo $this->atheme->group_input2('info[INF_ORDER]', 'Thứ tự', '', ' span6', @$info->INF_ORDER, 'text', ''); ?>
					
					</li>
					
					<?php
			if(@$info->INF_ID > 0)
			{
			?>
				 <li>
					<?php echo $this->atheme->group_text2( 'Ngày tạo: ', date("d/m/Y H:i:s",$info->INF_TIME_CREATE)); ?>	
				</li>
				<li>
					<?php echo $this->atheme->group_text2( 'Ngày cập nhật: ', date("d/m/Y H:i:s",$info->INF_TIME_UPDATE)); ?>	
				</li>
			
			<?php
				
			}
			?>
                </ul> 
				<div><br></div>
                <br clear="both">

            </div>

			<div><br></div>
			
			 <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>for SEO</h6></div>
            <div class="subcont">
                <ul class="details span10">
					 <li><div class="row-form">
    <div class="span3"><label for="txtCodeName">SEO URL *: </label></div>
    <div class="span9"><input type="text" id="txtCodeName" name="info[INF_CODE]" class="required span6" value="<?php echo @$info->INF_CODE;?>">
	<input type="checkbox" id="check_autocomplete" <?php echo (@$info->INF_ID > 0)?'':'checked=" checked"';?> > <em>Bật/tắt tự động điền SEO bài viết</em>
	</div>
    <div class="clear"></div>
</div></li>
					 
					 <li><?php echo $this->atheme->group_input2('info[SEO_H1]', 'SEO H1: ', '', 'span6', @$info->SEO_H1, 'text', ''); ?></li>
					 <li><?php echo $this->atheme->group_input2('info[SEO_KEYWORD]', 'SEO Keyword: ', '', ' span6', @$info->SEO_KEYWORD, 'text', ''); ?></li>
					 <li><?php echo $this->atheme->group_input2('info[SEO_DESCRIPTION]', 'SEO Description: ', '', 'span6', @$info->SEO_DESCRIPTION, 'text', ''); ?></li>
					 <li><?php echo $this->atheme->group_input2('info[SEO_METATITLE]', 'SEO Title: ', '', ' span6', @$info->SEO_METATITLE, 'text', ''); ?></li>

                </ul> <ul class="span8">
                   <input type="submit" name="send" class="btn btn-primary" value="<?php
			if(@$info->INF_ID > 0)
			{
				echo 'Lưu';
				
			}
			else {
				echo 'Thêm mới';
			}
			?>"/>
			
			
			<a href="<?php echo $this->url_index;?>" class="btn">Trở ra</a>
                </ul>
                <br clear="both">

            </div>
			
			
    </div>
	
	
        </form>
    </div>
 <script>
 
 //CKEDITOR.replace('editor1', { height: 300});
CKEDITOR.replace('editor2', { height: 100 });
/*
CKEDITOR.replace( 'editor1', {
extraPlugins = 'font',
	toolbar: [
		[ 'Undo', 'Redo' ,'Styles','Format'],
		['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],
	],
	height: 300
});
*/
 </script>
  <script type="text/javascript">
 
					function InsertToContent(someText) {
					var editor = CKEDITOR.instances.editor1; 
					editor.insertHtml('<img src="'+someText+'"/>');
					}
								
                                 </script>  